package com.leruan.aasimp.service.impl;

import java.util.List;

import com.leruan.aasimp.dao.BoardDao;
import com.leruan.aasimp.entity.Board;
import com.leruan.aasimp.service.BoardService;

public class BoardServiceImpl implements BoardService {
    private BoardDao boardDao;

    public List<Board> getBoard() {
        return boardDao.findBoard();
    }

    public void modifyBoardHits(Board board) {
        boardDao.updateBoardHits(board);
    }

    public BoardDao getBoardDao() {
        return boardDao;
    }

    public void setBoardDao(BoardDao boardDao) {
        this.boardDao = boardDao;
    }

    public Board getBoardById(String boardId) {
        return boardDao.findBoardById(boardId);
    }

    public void addBoard(Board board) {
        boardDao.insertBoard(board);
    }

    public void modifyBoardUser(String userId, Object object) {
        boardDao.updateBoardUser(userId, object);
    }

}
